/*     */ package com.sungrid.seine.oss.core.principal.model;
/*     */ 
/*     */ import com.sungrid.seine.oss.framework.Constants;
/*     */ import com.sungrid.seine.oss.framework.model.BaseObject;
/*     */ import com.sungrid.seine.oss.framework.security.Principal;
/*     */ import java.io.Serializable;
/*     */ import java.util.Date;
/*     */ import java.util.List;
/*     */ import java.util.Set;
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ public class SysPrincipal
/*     */   extends BaseObject
/*     */   implements Serializable, Principal
/*     */ {
/*     */   private static final long serialVersionUID = 5961187162278279600L;
/*     */   private String userId;
/*     */   private String userName;
/*     */   private String loginId;
/*     */   private String nickName;
/*     */   private String loginPasswd;
/*     */   private String remark;
/*     */   private Integer enabledFlag=Constants.ENABLED_FLAG_N;
/*     */   private String createdBy;
/*     */   private Date createdDate;
/*     */   private String lastUpdatedBy;
/*     */   private Date lastUpdatedDate;
/*     */   private Date lastLoginedDate;
/*     */   private String lastLoginedIp;
/*     */   private String orgId;
/*     */   private String principalType;
/*     */   private List userRoles;
/*     */   private Set userPermisses;
/*     */   private SysPrincipal creator;
/*     */   private String enabledFlagName;
/*     */   
/*     */   public SysPrincipal() {}
/*     */   
/*     */   public SysPrincipal(String loginId, String loginPasswd, Integer enabledFlag)
/*     */   {
/*  63 */     this.loginId = loginId;
/*  64 */     this.loginPasswd = loginPasswd;
/*  65 */     this.enabledFlag = enabledFlag;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */   public SysPrincipal(String userName, String loginId, String nickName, String loginPasswd, String remark, Integer enabledFlag, String createdBy, Date createdDate, String lastUpdatedBy, Date lastUpdatedDate)
/*     */   {
/*  72 */     this.userName = userName;
/*  73 */     this.loginId = loginId;
/*  74 */     this.nickName = nickName;
/*  75 */     this.loginPasswd = loginPasswd;
/*  76 */     this.remark = remark;
/*  77 */     this.enabledFlag = enabledFlag;
/*  78 */     this.createdBy = createdBy;
/*  79 */     this.createdDate = createdDate;
/*  80 */     this.lastUpdatedBy = lastUpdatedBy;
/*  81 */     this.lastUpdatedDate = lastUpdatedDate;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public String getUserId()
/*     */   {
/*  92 */     return this.userId;
/*     */   }
/*     */   
/*     */   public void setUserId(String userId)
/*     */   {
/*  97 */     this.userId = userId;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public String getUserName()
/*     */   {
/* 108 */     return this.userName;
/*     */   }
/*     */   
/*     */   public void setUserName(String userName)
/*     */   {
/* 113 */     this.userName = userName;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public String getLoginId()
/*     */   {
/* 124 */     return this.loginId;
/*     */   }
/*     */   
/*     */   public void setLoginId(String loginId)
/*     */   {
/* 129 */     this.loginId = loginId;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public String getNickName()
/*     */   {
/* 140 */     return this.nickName;
/*     */   }
/*     */   
/*     */   public void setNickName(String nickName)
/*     */   {
/* 145 */     this.nickName = nickName;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public String getLoginPasswd()
/*     */   {
/* 156 */     return this.loginPasswd;
/*     */   }
/*     */   
/*     */   public void setLoginPasswd(String loginPasswd)
/*     */   {
/* 161 */     this.loginPasswd = loginPasswd;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public String getRemark()
/*     */   {
/* 172 */     return this.remark;
/*     */   }
/*     */   
/*     */   public void setRemark(String remark)
/*     */   {
/* 177 */     this.remark = remark;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public Integer getEnabledFlag()
/*     */   {
/* 188 */     return this.enabledFlag;
/*     */   }
/*     */   
/*     */   public void setEnabledFlag(Integer enabledFlag)
/*     */   {
/* 193 */     this.enabledFlag = enabledFlag;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public String getCreatedBy()
/*     */   {
/* 204 */     return this.createdBy;
/*     */   }
/*     */   
/*     */   public void setCreatedBy(String createdBy)
/*     */   {
/* 209 */     this.createdBy = createdBy;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public Date getCreatedDate()
/*     */   {
/* 220 */     return this.createdDate;
/*     */   }
/*     */   
/*     */   public void setCreatedDate(Date createdDate)
/*     */   {
/* 225 */     this.createdDate = createdDate;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public String getLastUpdatedBy()
/*     */   {
/* 236 */     return this.lastUpdatedBy;
/*     */   }
/*     */   
/*     */   public void setLastUpdatedBy(String lastUpdatedBy)
/*     */   {
/* 241 */     this.lastUpdatedBy = lastUpdatedBy;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public Date getLastUpdatedDate()
/*     */   {
/* 252 */     return this.lastUpdatedDate;
/*     */   }
/*     */   
/*     */   public void setLastUpdatedDate(Date lastUpdatedDate)
/*     */   {
/* 257 */     this.lastUpdatedDate = lastUpdatedDate;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public String toString()
/*     */   {
/* 267 */     StringBuffer buffer = new StringBuffer();
/*     */     
/* 269 */     buffer.append(getClass().getName()).append("@").append(Integer.toHexString(hashCode())).append(" [");
/* 270 */     buffer.append("userName").append("='").append(getUserName()).append("' ");
/* 271 */     buffer.append("loginId").append("='").append(getLoginId()).append("' ");
/* 272 */     buffer.append("nickName").append("='").append(getNickName()).append("' ");
/* 273 */     buffer.append("loginPasswd").append("='").append(getLoginPasswd()).append("' ");
/* 274 */     buffer.append("remark").append("='").append(getRemark()).append("' ");
/* 275 */     buffer.append("enabledFlag").append("='").append(getEnabledFlag()).append("' ");
/* 276 */     buffer.append("createdBy").append("='").append(getCreatedBy()).append("' ");
/* 277 */     buffer.append("createdDate").append("='").append(getCreatedDate()).append("' ");
/* 278 */     buffer.append("lastUpdatedBy").append("='").append(getLastUpdatedBy()).append("' ");
/* 279 */     buffer.append("lastUpdatedDate").append("='").append(getLastUpdatedDate()).append("' ");
/* 280 */     buffer.append("]");
/*     */     
/* 282 */     return buffer.toString();
/*     */   }
/*     */   
/*     */   public boolean equals(Object other)
/*     */   {
/* 287 */     if (this == other)
/* 288 */       return true;
/* 289 */     if (other == null)
/* 290 */       return false;
/* 291 */     if (!(other instanceof SysPrincipal))
/* 292 */       return false;
/* 293 */     SysPrincipal castOther = (SysPrincipal)other;
/*     */     
/* 295 */     return ((getUserId() == castOther.getUserId()) || ((getUserId() != null) && (castOther.getUserId() != null) && (getUserId().equals(castOther.getUserId())))) && ((getUserName() == castOther.getUserName()) || ((getUserName() != null) && (castOther.getUserName() != null) && (getUserName().equals(castOther.getUserName())))) && ((getLoginId() == castOther.getLoginId()) || ((getLoginId() != null) && (castOther.getLoginId() != null) && (getLoginId().equals(castOther.getLoginId())))) && ((getNickName() == castOther.getNickName()) || ((getNickName() != null) && (castOther.getNickName() != null) && (getNickName().equals(castOther.getNickName())))) && ((getLoginPasswd() == castOther.getLoginPasswd()) || ((getLoginPasswd() != null) && (castOther.getLoginPasswd() != null) && (getLoginPasswd().equals(castOther.getLoginPasswd())))) && ((getRemark() == castOther.getRemark()) || ((getRemark() != null) && (castOther.getRemark() != null) && (getRemark().equals(castOther.getRemark())))) && ((getEnabledFlag() == castOther.getEnabledFlag()) || ((getEnabledFlag() != null) && (castOther.getEnabledFlag() != null) && (getEnabledFlag().equals(castOther.getEnabledFlag())))) && ((getCreatedBy() == castOther.getCreatedBy()) || ((getCreatedBy() != null) && (castOther.getCreatedBy() != null) && (getCreatedBy().equals(castOther.getCreatedBy())))) && ((getCreatedDate() == castOther.getCreatedDate()) || ((getCreatedDate() != null) && (castOther.getCreatedDate() != null) && (getCreatedDate().equals(castOther.getCreatedDate())))) && ((getLastUpdatedBy() == castOther.getLastUpdatedBy()) || ((getLastUpdatedBy() != null) && (castOther.getLastUpdatedBy() != null) && (getLastUpdatedBy().equals(castOther.getLastUpdatedBy())))) && ((getLastUpdatedDate() == castOther.getLastUpdatedDate()) || ((getLastUpdatedDate() != null) && (castOther.getLastUpdatedDate() != null) && (getLastUpdatedDate().equals(castOther.getLastUpdatedDate()))));
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public int hashCode()
/*     */   {
/* 321 */     int result = 17;
/*     */     
/* 323 */     result = 37 * result + (getUserId() == null ? 0 : getUserId().hashCode());
/* 324 */     result = 37 * result + (getUserName() == null ? 0 : getUserName().hashCode());
/* 325 */     result = 37 * result + (getLoginId() == null ? 0 : getLoginId().hashCode());
/* 326 */     result = 37 * result + (getNickName() == null ? 0 : getNickName().hashCode());
/* 327 */     result = 37 * result + (getLoginPasswd() == null ? 0 : getLoginPasswd().hashCode());
/* 328 */     result = 37 * result + (getRemark() == null ? 0 : getRemark().hashCode());
/* 329 */     result = 37 * result + (getEnabledFlag() == null ? 0 : getEnabledFlag().hashCode());
/* 330 */     result = 37 * result + (getCreatedBy() == null ? 0 : getCreatedBy().hashCode());
/* 331 */     result = 37 * result + (getCreatedDate() == null ? 0 : getCreatedDate().hashCode());
/* 332 */     result = 37 * result + (getLastUpdatedBy() == null ? 0 : getLastUpdatedBy().hashCode());
/* 333 */     result = 37 * result + (getLastUpdatedDate() == null ? 0 : getLastUpdatedDate().hashCode());
/* 334 */     return result;
/*     */   }
/*     */   
/*     */   public String getRemoteAddr()
/*     */   {
/* 339 */     return this.lastLoginedIp;
/*     */   }
/*     */   
/*     */   public Date getLoginedTime()
/*     */   {
/* 344 */     return this.lastLoginedDate;
/*     */   }
/*     */   
/*     */   public String getEnabledFlagName()
/*     */   {
/* 349 */     if (this.enabledFlag!=null&&this.enabledFlag.intValue() == Constants.ENABLED_FLAG_Y.intValue())
/*     */     {
/* 351 */       this.enabledFlagName = "有效";
/*     */     }
/*     */     else
/*     */     {
/* 355 */       this.enabledFlagName = "无效";
/*     */     }
/*     */     
/* 358 */     return this.enabledFlagName;
/*     */   }
/*     */   
/*     */   public void setEnabledFlagName(String enabledFlagName)
/*     */   {
/* 363 */     this.enabledFlagName = enabledFlagName;
/*     */   }
/*     */   
/*     */   public SysPrincipal getCreator()
/*     */   {
/* 368 */     return this.creator;
/*     */   }
/*     */   
/*     */   public void setCreator(SysPrincipal creator)
/*     */   {
/* 373 */     this.creator = creator;
/*     */   }
/*     */   
/*     */   public final List getUserRoles()
/*     */   {
/* 378 */     return this.userRoles;
/*     */   }
/*     */   
/*     */   public final void setUserRoles(List userRoles)
/*     */   {
/* 383 */     this.userRoles = userRoles;
/*     */   }
/*     */   
/*     */   public final Set getUserPermisses()
/*     */   {
/* 388 */     return this.userPermisses;
/*     */   }
/*     */   
/*     */   public final void setUserPermisses(Set userPermisses)
/*     */   {
/* 393 */     this.userPermisses = userPermisses;
/*     */   }
/*     */   
/*     */   public String getOrgId()
/*     */   {
/* 398 */     return this.orgId;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public String getLastLoginedIp()
/*     */   {
/* 406 */     return this.lastLoginedIp;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public void setLastLoginedIp(String lastLoginedIp)
/*     */   {
/* 415 */     this.lastLoginedIp = lastLoginedIp;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */   public Date getLastLoginedDate()
/*     */   {
/* 423 */     return this.lastLoginedDate;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public void setLastLoginedDate(Date lastLoginedDate)
/*     */   {
/* 432 */     this.lastLoginedDate = lastLoginedDate;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public void setOrgId(String orgId)
/*     */   {
/* 441 */     this.orgId = orgId;
/*     */   }
/*     */   
/*     */ 
/*     */ 
/*     */ 
/*     */ 
/*     */   public void setPrincipalType(String principalType)
/*     */   {
/* 450 */     this.principalType = principalType;
/*     */   }
/*     */   
/*     */   public String getPrincipalType()
/*     */   {
/* 455 */     return this.principalType;
/*     */   }
/*     */ }

/* Location:           E:\maven\repository\com\sungrid\seine-oss-framework\1.0.0\seine-oss-framework-1.0.0.jar
 * Qualified Name:     com.sungrid.seine.oss.core.principal.model.SysPrincipal
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.0.1
 */